package com.example.activityproject201202;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class BlueAct extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.blue_activity_layout);
        //获取到intent的对象
        Intent intent = getIntent();
        //通过intent对象获取到传过来的bundle对象
        Bundle bundle = intent.getExtras();
        String name = bundle.getString("name");
        String age = bundle.getString("age");
        Log.i("BlueAct","姓名："+name+" 年龄: "+age);
        Button done_bt = findViewById(R.id.done_bt);
        done_bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //关闭当前界面
               finish();
            }
        });

    }
}
